import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout, IFrameView } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'ic:baseline-view-in-ar',
      keepAlive: true,
      order: 1000,
      title: $t('page.page_title.onlyoffice'),
    },
    name: 'WordRouter',
    path: '/onlyoffice_doc',
    children: [
      // {
      //   name: 'OnlyofficeSuggest',
      //   path: '/onlyoffice_doc/suggest',
      //   component: IFrameView,
      //   meta: {
      //     icon: '/static/img/none.png',
      //     iframeSrc: 'https://docs.qq.com/sheet/DYURhSVBxWUpOZmFI?tab=BB08J2',
      //     title: "需求建议",
      //     keepAlive: true,
      //   },
      // },
      {
        name: 'OnlyofficeQuestion',
        path: '/onlyoffice_doc/question',
        component: () => import('#/views/demos/onlyoffice/NormalQuestion.vue'),
        meta: {
          icon: 'http://47.94.91.67/demo_file/img/question_warn.png',
          title: "商用说明",
          keepAlive: true,
        },
      },{
        meta: {
          // title: $t('page.page_title.onlyoffice_doc'),
          icon: '/static/img/none.png',
          title: '实用Demo',
          keepAlive: true,
        },
        name: 'OnlyofficeDoc1',
        path: '/onlyoffice_doc/demo',
        component: () => import('#/views/demos/onlyoffice/demoMain.vue')
        
      },{
        meta: {
          // title: $t('page.page_title.onlyoffice_doc'),
          icon: '/static/img/none.png',
          title: '扩展Api文档',
          keepAlive: true,
        },
        name: 'OnlyofficeDoc',
        path: '/onlyoffice_doc/main',
        component: () => import('#/views/demos/onlyoffice/apiMain.vue')
        
      },{
        name: 'OnlyofficePrice',
        path: '/onlyoffice_doc/price',
        meta: {
          icon: '/static/img/none.png',
          title: "价格和区别",
          keepAlive: true,
        },
        children: [
          {
            name: 'OnlyofficePriceProduction',
            path: '/onlyoffice_doc/price',
            component: IFrameView,
            meta: {
              icon: '/static/img/none.png',
              iframeSrc: 'https://docs.qq.com/sheet/DYWtCWEVuWm1qbmlL?tab=BB08J2',
              title: "报价单",
              keepAlive: true,
            },
          },{
            name: 'multDeploy',
            path: '/onlyoffice_doc/mult_deploy',
            component: () => import('#/views/demos/onlyoffice/MarkdownCom.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "商用集群部署",
              keepAlive: false,
              mdUrl: '/demo_script/md/mult_deploy.md'
            }
          },{
            name: 'mingwen_study',
            path: '/onlyoffice_doc/mingwen_study',
            component: () => import('#/views/demos/onlyoffice/MarkdownCom.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "源码学习版本",
              keepAlive: false,
              mdUrl: '/demo_script/md/mingwen_study.md'
            }
          },
        ]
      },{
        name: 'OnlyofficeContact',
        path: '/onlyoffice_doc/contact',
        component: () => import('#/views/demos/onlyoffice/ContactUs.vue'),
        meta: {
          icon: 'http://47.94.91.67/static/img/icon/wechat.png',
          title: "联系我们",
          keepAlive: true,
          abc: 123
        },
      },{
        name: 'OnlyofficeChangeLog',
        path: '/onlyoffice_doc/change_log',
        component: IFrameView,
        meta: {
          icon: '/static/img/none.png',
          iframeSrc: 'https://docs.qq.com/doc/DYXRCZHdnV3BVdWdt',
          title: "更新日志",
          keepAlive: true,
        },
      },{
        name: 'updateFunc',
        path: '/onlyoffice_doc/update_func',
        meta: {
          icon: '/static/img/none.png',
          title: "常见问题",
          keepAlive: false,
        },
        children: [
          {
            name: 'OnlyofficeError',
            path: '/onlyoffice_doc/error',
            component: () => import('#/views/demos/onlyoffice/NormalError.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "故障/问题",
              keepAlive: true,
            },
          },
          {
            name: 'loadFaster',
            path: '/onlyoffice_doc/load_faster',
            component: () => import('#/views/demos/onlyoffice/MarkdownCom.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "加载提速",
              keepAlive: false,
              mdUrl: '/demo_script/md/loadFaster.md'
            }
          },
          {
            name: 'updateFont',
            path: '/onlyoffice_doc/update_font',
            component: () => import('#/views/demos/onlyoffice/MarkdownCom.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "中文字体打包",
              keepAlive: false,
              mdUrl: '/demo_script/md/font.md'
            }
          },
          {
            name: 'nginx_proxy',
            path: '/onlyoffice_doc/nginx_proxy',
            component: () => import('#/views/demos/onlyoffice/MarkdownCom.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "nginx一级代理",
              keepAlive: false,
              mdUrl: '/demo_script/md/nginx_proxy.md'
            },
            children: [
              
            ]
          },
          {
            name: 'nginx_second_proxy',
            path: '/onlyoffice_doc/nginx_second_proxy',
            component: () => import('#/views/demos/onlyoffice/MarkdownCom.vue'),
            meta: {
              icon: '/static/img/none.png',
              title: "nginx二级代理-高级版自提",
              keepAlive: false,
              mdUrl: '/demo_script/md/nginx_proxy.md'
              // mdUrl: '/demo_script/md/nginx_second_proxy.md'
            },
            children: [
              
            ]
          }
        ]
      },
    ],
  },{
    component: BasicLayout,
    meta: {
      icon: 'ic:baseline-view-in-ar',
      keepAlive: true,
      order: 1000,
      title: "DocSpace协作空间",
    },
    name: 'DocSpaceRouter',
    path: '/doc_space',
    children: [
      {
        name: 'DocSpace',
        path: '/doc_space/base',
        component: IFrameView,
        meta: {
          icon: '/static/img/none.png',
          iframeSrc: 'https://www.onlyoffice.com/docspace.aspx',
          title: "官方原因-待定",
          keepAlive: true,
        },
      }
    ]
  }
];

export default routes;
